function onBridgeReady() {
	//分享给好友
	WeixinJSBridge.on('menu:share:appmessage', function(argv) 
	{
		WeixinJSBridge.invoke('sendAppMessage',{
			"img_url": "http://stage.billyn.net/images/mobile/cq-sport.jpg",
            "img_width": "160",
            "img_height": "160",
            "link": "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxfa9b2fff1a53ad4f&redirect_uri=http://hamshun.sinaapp.com/97sports/oath.php?to=http://stage.billyn.net/index.php/site/index/dv/wx/sp/5/op/37/b_linkId/044f90333decca534b633e461332a505/theLinkId/bookingCourt/theLinkIndex/1&response_type=code&scope=snsapi_base&state=1#wechat_redirect",
            "desc":  "城市之间的体育帮手，体育场馆推荐，活动赛事介绍！",
            "title": "环奥体育赛事"
		}, function(res) {
			if(res.err_msg=="send_app_msg:ok" || res.err_msg=="send_app_msg:confirm"){
            }
            _report('send_msg', res.err_msg);
		});
	});
	//分享到朋友圈
	WeixinJSBridge.on('menu:share:timeline', function(argv) 
	{
	WeixinJSBridge.invoke("shareTimeline",{
			"img_url": "http://stage.billyn.net/images/mobile/cq-sport.jpg",
            "img_width": "160",
            "img_height": "160",
            "link": "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxfa9b2fff1a53ad4f&redirect_uri=http://hamshun.sinaapp.com/97sports/oath.php?to=http://stage.billyn.net/index.php/site/index/dv/wx/sp/5/op/37/b_linkId/044f90333decca534b633e461332a505/theLinkId/bookingCourt/theLinkIndex/1&response_type=code&scope=snsapi_base&state=1#wechat_redirect",
            "desc":  "城市之间的体育帮手，体育场馆推荐，活动赛事介绍！",
            "title": "环奥体育赛事"
		},
		function(res){
			if(res.err_msg=="share_timeline:ok" || res.err_msg=="share_timeline:confirm"){
            }
             _report('timeline', res.err_msg);
		})
	});
	//分享到微博
	WeixinJSBridge.on('menu:share:weibo', function(argv) 
	{
	WeixinJSBridge.invoke("shareWeibo",{
			"img_url": "http://stage.billyn.net/images/mobile/cq-sport.jpg",
            "img_width": "160",
            "img_height": "160",
            "link": "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxfa9b2fff1a53ad4f&redirect_uri=http://hamshun.sinaapp.com/97sports/oath.php?to=http://stage.billyn.net/index.php/site/index/dv/wx/sp/5/op/37/b_linkId/044f90333decca534b633e461332a505/theLinkId/bookingCourt/theLinkIndex/1&response_type=code&scope=snsapi_base&state=1#wechat_redirect",
            "desc":  "城市之间的体育帮手，体育场馆推荐，活动赛事介绍！",
            "title": "环奥体育赛事"
		},
		function(res){
			if(res.err_msg=="share_weibo:ok" || res.err_msg=="share_weibo:confirm"){
            }
            _report('weibo', res.err_msg);
		})
	});
}

if (typeof WeixinJSBridge === "undefined"){
	if (document.addEventListener){
		document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
	}
}else{
	onBridgeReady();
}
